<?php
function reg($reginfo = null){
    if(empty($reginfo) || !isset($reginfo)){
        throw new Exception("非法参数");
    }
    if(empty($reginfo['email'])){
        throw new emailException("邮件为空");
    }
    if($reginfo['pwd'] != $reginfo['repwd']){
        throw new pwdException("两个密码不一致");
    }
    echo '注册成功';
}

